package org.jtb.flickrportlet;

import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

public class Resources {    
    private ResourceBundle rb;
    
    public Resources(String bundleName, Locale locale) {
        init(bundleName, locale);
    }
    
    private void init(String bundleName, Locale locale) {
        rb = ResourceBundle.getBundle(bundleName, locale);
    }        
    
    public String get(String key) {
        try {
            return rb.getString(key);            
        } catch (MissingResourceException mre) {
            return key;
        }
    }
}
